﻿namespace dpa.Library.Models;

public class FilterType
{
    public static readonly FilterType NameFilter =
        new("标题", nameof(Poetry.Name));

    public static readonly FilterType AuthorNameFilter =
        new("作者", nameof(Poetry.Author));

    public static readonly FilterType ContentFilter =
        new("内容", nameof(Poetry.Content));

    public static List<FilterType> FilterTypes { get; } =
        [NameFilter, AuthorNameFilter, ContentFilter];

    private FilterType(string name, string propertyName)
    {
        Name = name;
        PropertyName = propertyName;
    }

    public string Name { get; }

    public string PropertyName { get; }
}